<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: appHeader"></head>
<body ontouchstart>
<!--首页 tabbar -->
<div class="weui-tab">
    <div class="weui-tab__bd">
        <div id="tab2" class="weui-tab__bd-item weui-tab__bd-item--active">
            <div id="his-apply-list" class='demos-content-padded'>
                <div class="his-apply">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <b class="weui-form-preview__label">转序类型</b>
                            <b class="weui-form-preview__item" th:if="${hisApply.type == 1}">制作件</b>
                            <b class="weui-form-preview__item" th:if="${hisApply.type == 2}">装配件</b>
                            <b class="weui-form-preview__item" th:if="${hisApply.type == 3}">返修票</b>
                        </div>
                        <div class="weui-form-preview__item">
                            <b class="weui-form-preview__label">生产令号</b>
                            <b class="weui-form-preview__item" th:text="${hisApply.prodNo}"></b>
                        </div>
                        <div class="weui-form-preview__item">
                            <b class="weui-form-preview__label">图号</b>
                            <b class="weui-form-preview__item" th:text="${hisApply.drawNo}"></b>
                        </div>
                        <div class="weui-form-preview__item">
                            <b class="weui-form-preview__label">零件名称</b>
                            <b class="weui-form-preview__item" th:text="${hisApply.drawName}"></b>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">工艺路线</label>
                            <b class="weui-form-preview__item" th:text="${hisApply.route}+'    '+${hisApply.orderNo}"></b>
                        </div>
                        <div class="weui-form-preview__item" th:if="${hisApply.transMode == 2}">
                            <label class="weui-form-preview__label">工艺工序</label>
                            <b class="weui-form-preview__item" th:text="${hisApply.process}+'    '+${hisApply.handNo}"></b>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请数量</label>
                            <b class="weui-form-preview__item" th:text="${hisApply.num}"></b>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">状态</label>
                            <b class="weui-form-preview__item"
                               th:text="${T(com.zw.transition.util.ServiceUtil).trans(hisApply.status)}"></b>
                        </div>
                        <div class="weui-form-preview__item" th:if="${T(com.zw.transition.util.ServiceUtil).trans(hisApply.status) == '被驳回'}">
                            <b class="weui-form-preview__label">驳回原因</b>
                            <b class="weui-form-preview__item"
                               th:text="${hisApply.reason}"></b>
                        </div>
                    </div>
                    <div class="weui-form-preview__ft" th:if="${hisApply.status == 1} or ${hisApply.route == '机加' and hisApply.process == '划线' and hisApply.status == 2}">
                        <button type="button" class="weui-form-preview__btn weui-form-preview__btn_primary"
                                th:onclick="|cancelApply(${hisApply.id})|">撤销申请
                        </button>
                    </div>
                    <div class="weui-form-preview__ft" th:if="${hisApply.status == 4}">
                        <button type="button" class="weui-form-preview__btn weui-form-preview__btn_default"
                                th:onclick="|del(${hisApply.id})|">删除
                        </button>
                        <!--             <button type="button" class="weui-form-preview__btn weui-form-preview__btn_primary" th:onclick="|apply(${ha.id},${ha.tranType})|">重新申请</button>-->
                    </div>
                </div>
            </div>
            <div style="height: 70px"></div>
        </div>
    </div>

    <div class="weui-tabbar">
        <a th:href="@{/index}" class="weui-tabbar__item weui-bar__item--on">
            <div class="weui-tabbar__icon">
                <img th:src="@{/img/me.png}" alt="">
            </div>
            <p class="weui-tabbar__label">我的信息</p>
        </a>
        <a th:if="${#strings.contains(session.user.roles,'【转序接收】')}" th:href="@{/hisRec/null/null}" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img th:src="@{/img/his_rec.png}" alt="">
            </div>
            <p class="weui-tabbar__label">历史接收</p>
        </a>
        <a th:if="${#strings.contains(session.user.roles,'【转序质检】')}" th:href="@{/hisCheck/null/null}" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img th:src="@{/img/his_check.png}" alt="">
            </div>
            <p class="weui-tabbar__label">历史质检</p>
        </a>
        <a th:if="${#strings.contains(session.user.roles,'【入库质检】')}" onclick="tips()" href="javascript:void(0)" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img th:src="@{/img/his_check.png}" alt="">
            </div>
            <p class="weui-tabbar__label">入库历史质检</p>
        </a>
    </div>
</div>
<div th:include="include :: appFooter"></div>
<script th:src="@{/js/app-index.js}"></script>

</body>
</html>